package cn.com.cym.gamezao.dto;

import cn.com.cym.gamezao.enums.UserType;
import lombok.Getter;
import lombok.Setter;
import org.springframework.http.HttpStatus;

import java.util.Set;

@Setter
@Getter
public class UserResponse {

    private String token;

    private String privateKey;

    private UserType userType;

    /**
     * 状态  200成功
     */
    private Integer status;

    private String message;

    private Set<String> rules;

    public UserResponse(Integer status,String message){
        this.status=status;
        this.message=message;
    }

    public UserResponse(String token,String privateKey,String message){
        this.token=token;
        this.privateKey=privateKey;
        this.status= HttpStatus.OK.value();
        this.message=message;
        this.userType = UserType.APPLICANT;
    }

    public UserResponse(String token,String privateKey,String message,Set<String> rules,UserType userType){
        this.token=token;
        this.privateKey=privateKey;
        this.status= HttpStatus.OK.value();
        this.message=message;
        this.rules=rules;
        this.userType = userType;
    }
}
